<html>

  <head>
    <title>Motivation</title>
  </head>

  <h2>Motivation</h2>
  <hr NOSHADE SIZE=10 WIDTH=100%>

  <body>
    <form>
     
     <ul>
       <li><a href="#WHY_XMLSCHEMA">Why W3C XML-Schema?</a>
       <li><a href="#WHY_DB">Why Data-Binding?</a>
       <li><a href="#WHY_XSD2CPP">Why XmlPlus xsd2cpp?</a>
     </ul>

    <a name="WHY_XMLSCHEMA"><h3>Why W3C XML-Schema?</h3></a>
    <hr NOSHADE SIZE=7 WIDTH=100%>
    How do I constrain a well-formed XML document to a schema?
    <br><br>

    <b>Answer:</b><br>
    The XML file can have a schema specification for it.<br>
    There are at least two standard ways of providing schema for XML documents:
    <ul>
      <li> DTD -  Document Type Definition<br>
      <li> <b>W3C XML-Schema</b><br>
    </ul>

    Any such schema serves the purpose of validating the XML document against it, among other things. A XML document that validates against it's schema is called <b>valid</b> XML document.
    <br><br>

    <table border=0>
      <tr>
        <th width=80%></th>
        <th width=20%></th>
      </tr>
      <tr>
        <td>
        The <b>W3C XML-Schema</b> is considered to be more powerful in expressing the schema of the XML-document, than DTD. The <b>W3C XML-Schema</b> specification is also the more popular one, than DTD or other similar schema specifications.
        <br>
        To know more about XML-Schema, read <b>W3C</b> specifications on it. Following are a few related useful links:<br>
        <ul>
          <li><a href="http://www.w3.org/TR/xmlschema-0/">XML Schema Part 0: Primer Second Edition</a>
          <li> <a href="http://www.w3.org/TR/xmlschema-1/">XML Schema Part 1: Structures Second Edition</a>
          <li> <a href="http://www.w3.org/TR/xmlschema-2/">XML Schema Part 2: Datatypes Second Edition</a>
        </ul>

        </td>
        <td align=right> <img src="files/w3c_logo.png"> </td>
      </tr>
    </table>
    Henceforth, across different sections of XmlPlus documentation, the term XML-Schema means <b>W3C XML-Schema</b>.

    <br><br>
    
    <a name="WHY_DB"><h3>Why Data-Binding?</h3></a>
    <hr NOSHADE SIZE=7 WIDTH=100%>

    Given that we have a XML-Schema for my XML file, how do we write and read only the valid XML files ?  <br>
    If we use DOM API to write the XML files then it may take many iterations before we write the valid XML file. Where is the solution?
      <br><br>
    
    <b>Answer:</b><br> The solution is to use data-bindings for the XML-Schema.<br>
    The data-binding implementations typically provide following utilities:
    <ul>
      <li> The data-binding structures for XML-Schema eg. C++ classes for XML-Schema components 
      <li> Parser to read valid XML documents into data-binding structures
      <li> Writer to write the data-bindings to a xml file
    </ul>
    There are many data-binding solutions available across several platforms/programming-languages.<br>  

    
    <br><br>
    <a name="WHY_XSD2CPP"><h3>Why <i>XmlPlus-xsd2cpp</i>?</h3></a>
    <hr NOSHADE SIZE=7 WIDTH=100%>
    Why should I use XmlPlus?
    <br><br>
    
    <b>Answer:</b><br>
    XmlPlus provides <b>"simple to use"</b> C++ data-bindings for XML-Schema.<br>
    It is <b>free</b>. Read <a href="license.html">License</a> for terms of use.<br>
    Please read other sections on XmlPlus documentation, to learn more about it.

    <br><br>
    Currently Supported Platforms(OS):
    <ul>
      <li> Linux : <i>Ubuntu, Fedora, Redhat and other flavours of Linux</i>
      <li> Mac OS X
    </ul>
    
    <br>
    Currently Supported Encodings:
    <ul>
      <li> ASCII
      <li> UTF-8
      <li> ISO-8859-1
    </ul>


    </form>
  </body>
  

</html>
